<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
 <%@ include file="/common/query.jsp"%>
<%@ include file="/common/det.jsp"%>
<script>
		var viewType = getQueryStringByDecode("viewType");
        $(function(){
            if(viewType==""){
                init();
			}
			if(viewType=="1"){
                init1();
			}

        });
        function init1() {
            var columns = [

                {field:'pid',title:'pid',width:10,rowHidden:true},
                {field:'name',title:'模块名称',require:true},
                {field:'enName',title:'英文模块名称',require:true,rowHidden:true},
                {field:'url',title:'模块路径',require:true,rowHidden:true,rowHidden:true},
                {field:'id',title:'id',width:10,update:false,insert:false,rowHidden:true},
                {field:'orderBy',title:'排序',type:"number",defaultValue:0,rowHidden:true},
                {field:'opend',title:'是否展开',rowHidden:true,
                    input:{type:'radio',value : [{text:'否',value:0,isDefault:true},{text:'是',value : 1}]}
                }
            ];
            var tree = {
                pid:'pid',
                id : 'id',
                tpid:'0',
                treeField:'name',
                sort:'xuhao'
            };
            url='/system/menu/manager?';

            createQuery('body',columns,{
                onClickRow:function () {
					window.parent.seePermission(getGridChecked()[0]);
                },
                pager:false,edit:false,add:false,editBtn:false,searchBar:{hidden:true},del:false,tree:tree,heji:false,singleSelect:true},url);
        }
        function init(){
            var setting = {};
            var url ="";
            var p_insert = false;
            var p_del = false;

            var columns = [

                {field:'pid',title:'pid',width:10,rowHidden:true},
                {field:'name',title:'模块名称',require:true},
                {field:'enName',title:'英文模块名称',require:true},
                {field:'url',title:'模块路径',require:true,rowHidden:true},
                {field:'id',title:'id',width:10,update:false,insert:false},
                {field:'orderBy',title:'排序',type:"number",defaultValue:0},
                {field:'opend',title:'是否展开',rowHidden:true,
                    input:{type:'radio',value : [{text:'否',value:0,isDefault:true},{text:'是',value : 1}]}
                }
            ];
            var tree = {
                pid:'pid',
                id : 'id',
                tpid:'0',
                treeField:'name',
                sort:'xuhao'
            };
            url='/system/menu/manager?';

            createQuery('body',columns,{pager:false,edit:true,add:true,searchBar:{hidden:true},del:true,tree:tree,heji:false,singleSelect:true},url);
        }
</script>
</head>
<body>
	  <div id="body"></div>
</body>
</html>